/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ac.za.cput.kleintjes.question3.srp.violates.testing;

import ac.za.cput.kleintjes.question3.srp.violates.conf.FibonacciConfig;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import ac.za.cput.kleintjes.question3.srp.violates.model.FibonacciNumber;
import ac.za.cput.kleintjes.question3.srp.violates.services.Fibonacci;
import junit.framework.Assert;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 * @author Hughan.Kleintjes.hughanK@gmail.com
 */
public class FibonacciJUnitTestv {
    private static ApplicationContext ctx;
    private static Fibonacci number;
    
    public FibonacciJUnitTestv() {
    }

    @BeforeClass
    public static void setUpClass() throws Exception {
        ctx = new AnnotationConfigApplicationContext(FibonacciConfig.class);
        number = (Fibonacci)ctx.getBean("number");
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
    }

    /**
     * Test of printFibonacciNubmers method, of class Fibonacci.
     */
    @Test
    public void testPrintFibonacciNubmers() {
        System.out.println("printFibonacciNubmers");
        FibonacciNumber fnumber = new FibonacciNumber();
        number.printFibonacciNubmers(fnumber,10);
        Assert.assertNotNull(number);
    }

}
